﻿namespace UIControls
{
    public class RepeaterItemFactory
    {
        public static RepeaterItem GetRepeaterItem(int itemIndex, RepeaterListItemType listType)
        {
            switch (listType)
            {
                case RepeaterListItemType.ItemHeaderTemplate:
                    return new RepeaterHeaderItem(itemIndex);
                case RepeaterListItemType.ItemBodyTemplate:
                    return new RepeaterBodyItem(itemIndex);
                case RepeaterListItemType.ItemFooterTemplate:
                    return new RepeaterFooterItem(itemIndex);
            }
            return null;
        }
    }
}
